<div class="bg-light lter b-b wrapper-sm">
	<h1 class="m-n font-thin h4">编辑资质信息</h1>
</div>
<div class="wrapper-sm" ng-controller="carrierAttachmentEditController">
	<uib-tabset active="2" class="tab-container" ng-init="steps={percent:20, step1:false, step2:true, step3:false, step4:false, step5:false}">
		<uib-tab heading="基本信息" active="steps.step1" select="steps.percent=20" ui-sref="app.carrier.carrierManagentEdit"></uib-tab>
		<uib-tab heading="资质信息" index=2  disabled="step1.$invalid" select="steps.percent=35" ui-sref="app.carrier.carrierAttachment">
			<uib-progressbar value="steps.percent" class="progress-xs" type="success"></uib-progressbar>
			<div class="wrapper-sm ">
				<div class="panel panel-default">
					<div class="panel-heading font-bold">上传证件照片</div>
					<div class="panel-body" id="uploading">

		
						<ng-template ng-repeat="attach in attachList">
							<div class="col-md-4">
								<label class="pull-left m-l m-r">{{attach.title}}</label>
								<div class="col-md-5 form-group">
									<input type="file"  file-read uploader="attach.uploader" ng-hide="attach.uploader.queue.length" id="uploader_{{attch.uploaderName}}" name="{{attach.uploaderName}}" />
								</div>
							</div>
							<div class="wrapper-sm">
								<div class="line  pull-in"></div>
								<div class="wrapper-sm bg-light dk b-b m-b-xs hidden">
									<span class="">上传文件数: <b class="badge bg-info">{{ attach.uploader.queue.length }}</b></span>
								</div>
								<table class="table bg-white-only b-a">
									<thead>
										<tr>
											<th width="50%">名称</th>
											<th >大小</th>
											<th >进度</th>
											<th>状态</th>
											<th>操作</th>
										</tr>
									</thead>
									<tbody>
										<tr ng-repeat="item in attach.uploader.queue">
											<td>
												<strong>{{ item.fileName}}</strong>
												<div style="width:400px" ng-show="item._file" ng-thumb="{ file: item._file,width:400, path:item.imgSrc }"></div>
												<div ng-show="!item._file">
													<img data-ng-src="{{item.imgSrc}}" style="width:400px" ng-click="handleImgClick(item)" data-toggle="modal" data-target="#imgRotate">
												</div>
											</td>
											<td  nowrap>{{ item.fileSize/1024/1024|number:2 }} MB</td>
											<td >
												<div class="progress" style="margin-bottom: 0;">
													<div class="progress-bar" role="progressbar" ng-style="{ 'width': item.progress + '%' }"></div>
												</div>
											</td>
											<td class="text-center">
												<span ng-show="item.isSuccess"><i class="glyphicon glyphicon-ok"></i></span>
												<span ng-show="item.isCancel"><i class="glyphicon glyphicon-ban-circle"></i></span>
												<span ng-show="item.isError"><i class="glyphicon glyphicon-remove"></i></span>
											</td>
											<td nowrap>
												<button id="uploader_upload" type="button" class="btn btn-success btn-xs" ng-click="attach.uploader.upload(item)" ng-disabled=" item.isSuccess">
													<span class="glyphicon glyphicon-upload"></span> 上传
												</button>
												<button id="uploader_remove" type="button" class="btn btn-danger btn-xs" ng-click="attach.uploader.onDelete(item)" ng-disabled="!item.isSuccess">
													<span class="glyphicon glyphicon-trash"></span> 删除
												</button>
												<button id="uploader_download" type="button" class="btn btn-primary btn-xs" ng-click="attach.uploader.onDownload(item)" ng-disabled="!item.imgSrc">
													<span class="fa fa-cloud-download"></span> 下载
												</button>
											</td>
										</tr>
									</tbody>
								</table>
							</div>
						</ng-template>
						<button id="carrierAttachment_save" type="button" class="btn btn-primary btn-s" ng-click="save()">
							<span class="glyphicon glyphicon-floppy-saved"></span> 保存
						</button>
						<tms-img-rotate src="selectedImgSrc"></tms-img-rotate>
					</div>

				
				</div>
			</div>
		</uib-tab>
		<uib-tab heading="账户信息"  disabled="step2.$invalid" select="steps.percent=55" ui-sref="app.carrier.carrierBankEdit"></uib-tab>
		<uib-tab heading="主营线路"  disabled="step3.$invalid" select="steps.percent=75" ui-sref="app.carrier.carrierRouteManagent"></uib-tab>
		<!--<uib-tab heading="所属车辆"  disabled="step4.$invalid" select="steps.percent=100" ui-sref="app.carrier.carrieCarEdit"></uib-tab>-->
	</uib-tabset>
</div>